import http from "@/api";
import { PORT5, PORT6 } from "@/api/config/servicePort";

//获取平台权限列表
export const getPlatformAuthListApi: any = params => {
  return http.post<any>(`${PORT5}/shopAuthList`, params, { loading: params.loading });
};
//新增平台权限
export const addPlatformAuthApi: any = params => {
  return http.post<any>(`${PORT5}/addShopAuth`, params, { loading: params.loading });
};

//编辑平台权限
export const editPlatformAuthApi: any = params => {
  return http.post<any>(`${PORT5}/editShopAuth`, params, { loading: params.loading });
};

//删除平台权限
export const deletePlatformAuthApi: any = params => {
  return http.post<any>(`${PORT5}/delShopAuth`, params, { loading: params.loading });
};

//获取套餐包列表
export const getPackageListApi: any = params => {
  return http.post<any>(`${PORT5}/shopAuthPackageList`, params, { loading: params.loading });
};

//新增套餐包
export const addPackageApi: any = params => {
  return http.post<any>(`${PORT5}/operateAuthPackage`, params, { loading: params.loading });
};

//删除套餐包
export const deletePackageApi: any = params => {
  return http.post<any>(`${PORT5}/delShopAuthPackage`, params, { loading: params.loading });
};

//套餐包详情
export const getPackageDetailApi: any = params => {
  return http.post<any>(`${PORT5}/shopAuthPackageDetail`, params, { loading: params.loading });
};

//为某个店铺设置套餐包
export const setShopPackageApi: any = params => {
  return http.post<any>(`${PORT5}/editShopPackage`, params, { loading: params.loading });
};

//商户权限列表
export const getShopAuthListApi: any = params => {
  return http.post<any>(`${PORT6}/authRuleList`, params, { loading: params.loading });
};

//添加商户权限
export const addShopAuthApi: any = params => {
  return http.post<any>(`${PORT5}/addShopAuthRule`, params, { loading: params.loading });
};

//删除商户权限
export const deleteShopAuthApi: any = params => {
  return http.post<any>(`${PORT5}/delShopAuthRule`, params, { loading: params.loading });
};
